<template>
    <div class="brand">
        <div id="main">
             <div class="brandInfo">
                  <div class="brandInfo_box">
                     <div class="brandBox">
                         <p>{{brandData.title}}</p>
                         <img v-bind:src="brandData.image">
                     </div>      
                  </div>
                   <div class="content">
                      <span>{{brandData.content}}</span>
                   </div>
            </div>
        </div>
        <Footer></Footer>
    </div>
</template>
<script>
import Header from '@/components/header'
import Footer from '@/components/footer'
import Loading from '@/components/loading'
export default {
  name: "brand",
  components:{
     Header,
     Footer,
     Loading
  },
  data () {
    return {
        name:'我要测试首页',
        transparency:"rgba(255,255,255,1)",
        brandData:[]
    }
  },
  mounted:function(){ 
       window.scrollTo(0, 0);
  },
  methods: {
      getRouterData () {
          this.$loading(this.$t("contact.loading"));
          let penga = this.$route.query.id;
          let url = '/api/brands/'+penga;
          let self = this;
          axios.get(url)
            .then(function (response) {
               self.closeLoading();
               self.brandData = response.data;
            })
            .catch(function (error) {
                console.log(JSON.stringify(error));
            }) 
      },
      closeLoading(){
         this.$loading.close();
      }  
  },
  created:function () {
     this.getRouterData();
  } 
};
</script>
<style scoped>
  .brandInfo{width:100%;min-height:calc(100vh - 440px);}
  .brandInfo_box{background:#fff6e9;}
  .brandBox,.content{width:76%;margin:0px auto;}
  .brandBox p {width:100%;line-height:60px;text-align:left;padding:0.5em 0em;font-size:1.1rem;color:#7b5c55;font-weight:bold;}
  .brandBox img{display:block;max-width:100%;background:#fff6e9;margin:0px auto;}
  .content span{text-align:left;padding:1.5rem 0rem;display:block;line-height:24px;font-size:0.9rem;color:#7b5c55;}
</style>